<?php

namespace App\Service\Moment\v1_1_8;

use App\Model\UserInteractMsg;
use App\Service\BaseService;

/**
 * 动态新消息列表
 */
class MomentMsgListService extends BaseService
{
    public function handle()
    {
        $userId = $this->getUserId();
        $data = UserInteractMsg::getMomentMsgs($userId);
        $ret['list'] = [];
        foreach ($data as $item) {
            $ret['list'][] = UserInteractMsg::buildItem($item);
        }
        // log_user_result($userId, $ret);
        return $ret;
    }
}
